package pa165.dominatingspecies.frontend.application;

import pa165.dominatingspecies.frontend.pages.MainPage;
import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Tomas Kalla
 */
public class DominantSpeciesApplication extends WebApplication {

    @Override
    public Class<? extends Page> getHomePage() {

        return MainPage.class;
    }

    @Override
    public void init() {
        super.init();
        ApplicationContext ctx = new ClassPathXmlApplicationContext("application-context.xml");
        getComponentInstantiationListeners().add(new SpringComponentInjector(this, ctx));
        
    }
}
